package models

import (
	"time"
	"github.com/astaxie/beego/orm"
)

type Order struct {
	Id          int64
	UserId      int        `ht:"list;search;name(用户Id)"`
	UserName    string        `ht:"list;name(用户名)"`
	Type        int                `ht:"list;name(订单类型)"`
	OrderTime   time.Time        `ht:"list;name(订单时间)"`
	GoodsId     int                `ht:"list;name(商品Id)"`
	PayPrice    float64        `ht:"list;name(实付金额)"`
	CutPrice    float64        `ht:"name(折扣金额)"`
	//reserved
	ExtroPay    int64        `ht:"hide"`
	ExtroPaystr string        `ht:"hide"`
	ExtroToken  string        `ht:"hide"`
}

func init() {
	orm.RegisterModel(new(Order))
}
func (*Order)TableName() string {
	return "order"
}

func (*Order) FN_Id() string {
	return "Id"
}
func (*Order) FN_UserId() string {
	return "UserId"
}
func (*Order) FN_UserName() string {
	return "UserName"
}
func (*Order) FN_Type() string {
	return "Type"
}
func (*Order) FN_OrderTime() string {
	return "OrderTime"
}
func (*Order) FN_GoodsId() string {
	return "GoodsId"
}
func (*Order) FN_PayPrice() string {
	return "PayPrice"
}
func (*Order) FN_CutPrice() string {
	return "CutPrice"
}
func (*Order) FN_ExtroPay() string {
	return "ExtroPay"
}
func (*Order) FN_ExtroPaystr() string {
	return "ExtroPaystr"
}
func (*Order) FN_ExtroToken() string {
	return "ExtroToken"
}